<template>
  <div class="w950">
    <!-- 个人信息 -->
    <div class="center_box">
      <div class="center_tt">
        我的关注
        <span class="line">
          <s class="l_4"></s>
        </span>
      </div>
      <div class="blk_coin">
        <div class="center_tab">
          <a
            href="#"
            title="我的消息"
            :class="{ current: a }"
            @click="
              a = true;
              b = false;
            "
            >我的消息</a
          >
          <a
            href="#"
            title="消息设置"
            :class="{ current: b }"
            @click="(a = false), (b = true)"
            >消息设置</a
          >
        </div>
        <div class="center_tbl" v-show="a">
          <!-- 我的消息 -->
          <div class="choose_box">
            <div id="choose_game" class="mr20 choose_game fl">
              <p class="fl" style="margin: 12px 8px">选择游戏：</p>
              <div class="box" id="selectBorder">
                <div class="tt" @mouseenter="yr">
                  <s class="i_sp"></s>

                  <span
                    id="curBizName"
                    class="curBizName"
                    key="cf"
                    value="穿越火线"
                    >穿越火线</span
                  >
                </div>
                <div
                  @mouseleave="yc"
                  class="choose_sub"
                  id="game_list"
                  key="cf"
                  value="穿越火线"
                >
                  <dl>
                    <dt>竞技游戏：</dt>
                    <dd class="clearfix">
                      <a biz="cfhd" href="#">CF高清竞技大区</a><i>|</i>
                      <a biz="cf" href="#">穿越火线</a><i>|</i>
                      <a biz="fo4" href="#">FIFA OL4</a><i>|</i>
                      <a biz="nba2k2" href="#">NBA2KOL2</a><i>|</i>
                      <a biz="zzlt" href="#">战争雷霆</a><i>|</i>
                      <a biz="nba2k" href="#">NBA2KOL</a><i>|</i>
                      <a biz="lol" href="#">英雄联盟</a><i>|</i>
                      <a biz="tps" href="#">枪神纪</a><i>|</i>
                      <a biz="nz" href="#">逆战</a>
                    </dd>
                  </dl>
                  <dl>
                    <dt>休闲游戏：</dt>
                    <dd class="clearfix">
                      <a biz="x52" href="#">QQ炫舞2</a><i>|</i>
                      <a biz="speed" href="#">飞车</a><i>|</i>
                      <a biz="x5" href="#">炫舞</a>
                    </dd>
                  </dl>
                  <dl>
                    <dt>角色扮演：</dt>
                    <dd class="clearfix">
                      <a biz="age" href="#">上古世纪</a><i>|</i>
                      <a biz="mxd2" href="#">冒险岛2</a><i>|</i>
                      <a biz="fo" href="#">QQ幻想</a><i>|</i>
                      <a biz="dzs" href="#">斗战神</a><i>|</i>
                      <a biz="dnf" href="#">地下城与勇士</a><i>|</i>
                      <a biz="xy" href="#">轩辕</a><i>|</i>
                      <a biz="tiantang2" href="#">天堂2</a><i>|</i>
                      <a biz="xxz" href="#">仙侠传</a><i>|</i>
                      <a biz="ffo" href="#">自由幻想</a><i>|</i>
                      <a biz="tiantang" href="#">天堂</a><i>|</i>
                      <a biz="hxsj" href="#">幻想世界</a><i>|</i>
                      <a biz="sg" href="#">QQ三国</a><i>|</i>
                      <a biz="jf" href="#">疾风之刃</a><i>|</i>
                      <a biz="dj2" href="#">刀剑2</a><i>|</i>
                      <a biz="bns" href="#">剑灵</a><i>|</i>
                      <a biz="yl" href="#">御龙在天</a><i>|</i>
                      <a biz="wuxia" href="#">天涯明月刀</a>
                    </dd>
                  </dl>
                  <dl>
                    <dt>网页游戏：</dt>
                    <dd class="clearfix">
                      <a biz="cos" href="#">英魂之刃</a><i>|</i>
                      <a biz="hyol" href="#">火影忍者Online</a><i>|</i>
                      <a biz="bl" href="#">部落守卫战(网页版)</a><i>|</i>
                      <a biz="fight" href="#">宠物大乐斗</a><i>|</i>
                      <a biz="zg" href="#">烽火战国</a>
                    </dd>
                  </dl>
                </div>
              </div>
              <p class="txt fl">
                <a href="javascript:;" class="comm_btn" id="btn_query">查询</a>
              </p>
            </div>
          </div>

          <div class="tbl_con" v-if="false">
            <div class="pic"></div>
            <div class="txt">
              <p class="tt">
                抱歉，此页面暂无消息！您可能未关注活动或者活动未更新消息。
              </p>
              <p>您可以：</p>
              <p>
                1、进入道聚城首页参加更多热门活动，<a href="#" class="blue"
                  >立即前往></a
                >
              </p>
            </div>
          </div>
          <div class="tbl_con1" v-else>
            <table border="1" style="width: 866px; border: 0;">
            <tr>
              <th>商品名称</th>
              <th>商品图片</th>
              <th>所属游戏</th>
              <th>加关注时间</th>
              <th>操作</th>
            </tr>
            <tr v-for="item in gz" :key="item.id">
              <td>{{item.goodsName}}</td>
              <td><img :src="item.img" alt="" style="width: 40px; hight: 40px;"></td>
              <td>{{item.game}}</td>
              <td>{{item.time}}</td>
              <td><span style="color: #1994eb;" @click="RemoveFollow(item.id)">取消关注</span></td>
            </tr>
          </table>
          </div>
        </div>
        <!-- 消息设置 -->
        <div class="center_tbl" v-show="b">
          <div class="tbl_con">
            <div class="pic"></div>
            <div class="txt">
              <p class="tt">
                抱歉，此页面暂无消息！您可能未关注活动或者活动未更新消息。
              </p>
              <p>您可以：</p>
              <p>
                1、进入道聚城首页参加更多热门活动，<a href="#" class="blue"
                  >立即前往></a
                >
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 猜你喜欢 -->
    <div class="favorite">
      <div class="tt">
        <h6 class="fl">猜你喜欢</h6>
        <a href="#" class="more">换一换>></a>
      </div>
      <div class="clearfix">
        <div class="fav_wrapper">
          <dl>
            <dt>
              <a href="#" target="_blank">
                <img
                  src="https://ossweb-img.qq.com/images/daoju/app/cf/rectangle/N-cf-undefined-111943-100000-r479.jpg?_t=1647423450"
                  alt=""
                />
              </a>
            </dt>
            <dd>
              <p>
                <a href="#">
                  <b class="e">[穿越火线]</b>
                  火麒麟宝箱（1个）
                </a>
              </p>
              <p class="red">
                商城价：
                <b>6.00 QB</b>
              </p>
            </dd>
          </dl>
          <dl>
            <dt>
              <a href="#" target="_blank">
                <img
                  src="https://ossweb-img.qq.com/images/daoju/dbm/cf/54KnightSR25.jpg"
                  alt=""
                />
              </a>
            </dt>
            <dd>
              <p>
                <a href="#">
                  <b class="e">[穿越火线]</b>
                  Knight SR25（30天）
                </a>
              </p>
              <p class="red">
                商城价：
                <b>30.00 QB</b>
              </p>
            </dd>
          </dl>
          <dl>
            <dt>
              <a href="#" target="_blank">
                <img
                  src="https://ossweb-img.qq.com/images/daoju/app/cf/rectangle/N-cf-1-111943-100000-s25273.jpg?_t=1605518493"
                  alt=""
                />
              </a>
            </dt>
            <dd>
              <p>
                <a href="#">
                  <b class="e">[穿越火线]</b>
                  零-水下丽影宝箱（1个）
                </a>
              </p>
              <p class="red">
                商城价：
                <b>6.00 QB</b>
              </p>
            </dd>
          </dl>
          <dl>
            <dt>
              <a href="#" target="_blank">
                <img
                  src="https://ossweb-img.qq.com/images/daoju/app/cf/rectangle/N-cf-1-111943-103936-s26239.jpg?_t=1612691407"
                  alt=""
                />
              </a>
            </dt>
            <dd>
              <p>
                <a href="#">
                  <b class="e">[穿越火线]</b>
                  春节宝箱（5个）
                </a>
              </p>
              <p class="red">
                商城价：
                <b>28.00 QB</b>
              </p>
            </dd>
          </dl>
          <dl>
            <dt>
              <a href="#" target="_blank">
                <img
                  src="https://ossweb-img.qq.com/images/daoju/dbm/cf/107XM8-A.jpg"
                  alt=""
                />
              </a>
            </dt>
            <dd>
              <p>
                <a href="#">
                  <b class="e">[穿越火线]</b>
                  ，XM8-A（30天）
                </a>
              </p>
              <p class="red">
                商城价：
                <b>28.90 QB</b>
              </p>
            </dd>
          </dl>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { queryFollow, queryRemoveFollow } from '@/api/goods'
export default {
  name: 'Rwu12',
  data () {
    return {
      a: true,
      b: false,
      q: true,
      w: false,
      e: false,
      o: true,
      gz: []
    }
  },
  mounted () {
    this.Follow()
  },
  methods: {
    yr () {
      document.querySelector('.choose_sub').style.display = 'block'
    },
    yc () {
      document.querySelector('.choose_sub').style.display = 'none'
    },
    async Follow () {
      const res = await queryFollow()
      this.gz = res
    },
    async RemoveFollow (id) {
      await queryRemoveFollow(id)
      this.Follow()
    }
  }
}
</script>

<style lang="scss" scoped>
.w950 {
  width: 950px;
  .center_box {
    width: 910px;
    height: 400px;
    margin-bottom: 10px;
    padding: 15px 20px 20px 20px;
    border: 1px solid #e6e9ef;
    background: #fff;
    .center_tt {
      font-size: 14px;
      font-weight: 800;
      margin-bottom: 20px;
      position: relative;
      .line {
        display: block;
        background: #e6e9ef;
        height: 1px;
        overflow: hidden;
        margin-top: 5px;
        s.l_4 {
          width: 58px;
          display: block;
          background: #f74a4a;
          height: 1px;
          overflow: hidden;
        }
      }
    }
  }
  .blk_coin {
    width: 908px;
    height: 350px;
    border: 1px solid #e6e9ef;
    background: #fff;

    .center_tbl {
      width: 906px;
      height: 140px;
      .choose_box {
        width: 866px;
        height: 54px;
        margin: 8px 0px 0 22px;
        // padding: 10px 20px;
        line-height: 30px;
        border: 1px solid #e6e9ef;
        background: #fff;
        margin-bottom: 20px;
        a.comm_btn {
          width: 90px;
          height: 25px;
          line-height: 26px;
          overflow: hidden;
          text-decoration: none;
          margin: -39px 0px 32px 233px;
        }
        .comm_btn {
          display: inline-block;
          background: #f74a4a;
          color: #fff;
          border-bottom: 2px solid #e43333;
          text-align: center;
          cursor: pointer;
        }
        .box {
          border: 1px solid #e5e5e5;
          padding: 5px 15px;
          line-height: 20px;
          height: 20px;
          width: 120px;
          margin-right: 15px;
          position: relative;
          z-index: 20;
          float: left;
          margin: -42px 0px 0px 70px;
          .choose_sub {
            top: 30px;
            left: -1px;
            width: 420px;
            display: none;
            position: absolute;
            z-index: 1;
            top: 36px;
            left: 0;
            border: 1px solid #e5e5e5;
            width: 395px;
            padding: 0 10px;
            background: #fff;
            overflow: hidden;
            dd {
              margin-left: 70px;
              a:hover {
                color: #f74a4a;
              }
              i {
                font-style: normal;
                margin: 0 5px;
              }
              a,
              i {
                display: block;
                float: left;
                white-space: nowrap;
              }
            }
            dl {
              border-top: 1px solid #e5e5e5;
              padding: 10px;
              margin-top: -1px;
              line-height: 26px;
              dt {
                font-weight: 800;
                float: left;
              }
            }
          }
          s {
            float: right;
            width: 10px;
            height: 7px;
            margin-top: 7px;
            overflow: hidden;
          }
          .i_sp {
            background: url(//js02.daoju.qq.com/common/images/icon.png)
              no-repeat;
            background-position: 0 -24px;
          }
        }
      }
      td {
        border-top: 1px solid #e6e9ef;
        padding: 11px 0;
        line-height: 18px;
        text-align: center;
        label {
          margin-left: 20px;
        }
        .blue,
        a.blue {
          color: #1994eb;
        }
      }
      th {
        font-weight: 400;
        font-size: 14px;
        padding: 11px 0;
        line-height: 18px;
        text-align: center;
      }
      .loading {
        display: table;
        width: 100%;
        background: #fff;
        _display: block;
        .loadmsg {
          display: table-cell;
          _display: block;
          vertical-align: middle;
          text-align: center;
          background: url(//daoju.qq.com/becombine/mall/images/loading.gif)
            no-repeat center center;
          padding-top: 110px;
        }
      }
      .vat-hd {
        width: 866px;
        height: 51px;
        border-bottom: 1px solid #d1d1d1;
        zoom: 1;
        list-style: none;
        .od1 {
          width: 122px;
        }
        .od2 {
          width: 200px;
        }
        .od3 {
          width: 150px;
        }
        .od4 {
          width: 206px;
        }
        .od5 {
          width: 174px;
        }
        li {
          float: left;
          text-align: center;
          font-size: 14px;
          height: 50px;
          line-height: 50px;
          overflow: hidden;
        }
      }
      .pic {
        float: left;
        width: 100px;
        height: 100px;
        background: url(//js02.daoju.qq.com/common/images/emotion.png) no-repeat;
      }
      .tbl_con {
        width: 540px;
        height: 120px;
        margin: 22px auto;
        line-height: 24px;
        // padding: 10px 0;
        color: #666;
        // display: none;
        padding: 0px 10px;
        .tt {
          font-weight: 700;
          font-size: 14px;
          color: #333;
          padding-bottom: 10px;
        }
        .txt {
          width: 430px;
          height: 92px;
          margin-left: 110px;
          padding-top: 10px;
          .blue {
            color: #1994ed;
          }
        }
      }
    }
    .center_tab {
      border-bottom: 1px solid #e6e9ef;
      height: 44px;
      a {
        width: 130px;
        height: 44px;
        font-size: 14px;
        line-height: 44px;
        text-align: center;
        border-right: 1px solid #e6e9ef;
        float: left;
        text-decoration: none;
        color: #3a3f4a;
      }
      a.current {
        border-bottom: 1px solid #f74a4a;
      }
    }
  }
  .tbl_con1 {
    width: 866px;
    height: 200px;
    margin: 0 auto;
    tr {
      border: 0;
      border-bottom: 1px dotted #DEDFDE;
      th {
        border: 0;
      }
      td {
        border: 0;
      }
    }
  }
}
.favorite {
  width: 950px;
  height: 255px;
  border: 1px solid #e6e9ef;
  background-color: #fff;
  .tt {
    width: 930px;
    font-size: 14px;
    height: 36px;
    line-height: 36px;
    padding: 0 10px;
    border-bottom: 1px solid #e6e9ef;
    .fl {
      float: left;
      font-size: 100%;
    }
    .more {
      font-size: 12px;
      color: #1994eb;
      font-family: "\5b8b\4f53";
      float: right;
    }
  }
  .clearfix {
    width: 950px;
    height: 218px;
    dl {
      width: 122px;
      height: 162px;
      padding: 28px 32px;
      border-left: 1px solid #f3f4f6;
      float: left;
      dt {
        width: 122px;
        height: 75px;
        img {
          display: block;
          width: 90px;
          height: 75px;
          margin: 10px auto;
        }
      }
      dd {
        width: 122px;
        height: 60px;
        text-align: center;
        margin-top: 9px;
        .red {
          height: 20px;
          color: #f74a4a;
          margin: 4px 0;
        }
        p {
          height: 37px;
          overflow: hidden;
          a:hover {
            color: #f74a4a;
          }
          .e {
            display: block;
            margin: 2px 0;
          }
          b {
            margin: 2px 0;
          }
        }
      }
    }
  }
}
</style>
